<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            perspective: 500px;
        }
        img{
            display: block;
            margin: 0 auto;
          transition: all 2s;
        }
        img:hover{
            transform: rotateX(180deg);
        }
    </style>
</head>
<body>
   <img src="./img/pig.jpg" alt="">
</html>